-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Move Player ghosting functionality to GhostComponent #1413
Conversation
- Move code to CharacterComponent - Remove extraneous interfaces - Simplify some code greatly - Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.) - Update code to use CharacterComponent for sending to zone instead of Player*.
- Move code to CharacterComponent - Remove extraneous interfaces - Simplify some code greatly - Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.) - Update code to use CharacterComponent for sending to zone instead of Player*. - Remove static storage container (static containers can be destroyed before exit/terminate handler executes)
Used for the static Player functions. Further removes stuff from the Player class/file.
Tested that ghosting still works and players are still firing off the OnPlayerLeave and relevant handlers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to ghosting vector to a hashset.
Are you sure you would like to integrate a change like this into this PR? I tried to make this one as close to just moving the code as possible and updating the calls where necessary. Is this still a change you would like? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Felt like an appropriate time to get that change through; shouldn't have phrased it as a requirement though.
will do so then, just wanted to double check since this seemed to be optimized for storage and cache locality for some reason. Not sure if that was for speed or because unordered_set was unknown about at the time |
This was written before I'd taken the data structures course at uni lol |
:( |
The merge-base changed after approval.
I love the prospect of "Please get rid of my old code now, we dont need it anymore" |
Waiting on #1412
Tested that ghosting still works and players are still firing off the OnPlayerLeave and relevant handlers.